package com.activenetwork.smlite.page;

import org.openqa.selenium.By;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

import com.activenetwork.smlite.page.generic.PageObject;
import com.activenetwork.util.EnvContext;

public class LoginErrorPage implements PageObject {
	
	private final WebDriver driver = EnvContext.webDriverTL.get();
	
	public String getErrorMsg(){
		try{
			WebElement error = driver.findElement(By.xpath("//div[@class='ErrorContainer']//span[@class='feedbackPanelERROR']"));
			return error.getText().trim();
		}catch(NoSuchElementException e){
			return "";
		}
	}

}
